﻿<controls:ChildWindow x:Class="LEEAAttendanceControl.Views.JobsEdit"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
           xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           Width="400" Height="370">
    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        
        <Grid Grid.Row="0" Margin="15" HorizontalAlignment="Center" DataContext="{Binding}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            
            <sdk:Label Content="Job ID:" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left" Margin="3"
                       VerticalAlignment="Center"/>
            
            <TextBox x:Name="CustomIDBox" Width="150" Grid.Column="1" Grid.Row="0" Margin="3" HorizontalAlignment="Left"
                     Text="{Binding CustomJobID, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True}"
                     Background="#FFD4E515" IsEnabled="False"/>

            <sdk:Label Content="Job Name:" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Left" Margin="3"
                       VerticalAlignment="Center"/>

            <TextBox x:Name="JobNameBox" Width="150" Grid.Column="1" Grid.Row="1" Margin="3" HorizontalAlignment="Left"
                     Text="{Binding JobName, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True
                     , TargetNullValue=''}"/>

            <sdk:Label Content="Description:" Grid.Column="0" Grid.Row="2" HorizontalAlignment="Left" Margin="3"
                       VerticalAlignment="Center"/>

            <TextBox x:Name="DescriptionBox" Width="240" Grid.Column="1" Grid.Row="2" Margin="3" AcceptsReturn="True"
                     Height="70" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
                     Text="{Binding Description, Mode=TwoWay, ValidatesOnExceptions=True, NotifyOnValidationError=True
                     , TargetNullValue=''}"/>
        </Grid>
        
        <Button x:Name="SaveButton" Grid.Row="1" Content="Save" Width="65" Height="25" HorizontalAlignment="Right"
                Margin="100,0,20,0" Click="SaveButton_Click"/>
        
        <sdk:ValidationSummary x:Name="ErrorSummary" Grid.Row="2" Margin="0,19,0,0" Height="120"/>
    </Grid>
</controls:ChildWindow>